package day8;

public class Person {
    private String name;

    public Person(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void driveToWork(Car car) {
        System.out.print(this.name);
        car.drive();
        System.out.println("去公司");
    }
}
